package cn.tedu.oop;

public class Test2_Extends2 {
    public static void main(String[] args) {
        Zi2 zi = new Zi2();
        zi.eat();
        zi.study();
        zi.sleep();
    }
}
class Fu2{
    public void eat(){
        System.out.println("爸爸在吃猪肉");
    }
    public void study(){
        System.out.println("爸爸在学搓麻");
    }
}
class Zi2 extends Fu2{
    public void eat(){
        super.eat();
        System.out.println("儿子在吃菜");
    }
    public void study(){
        System.out.println("儿子在学java");
    }
    public void sleep(){
        System.out.println("sleep()...");
    }
}